import * as TYPES from "./../action-type";
import { cloneDeep } from "lodash";

let initial = {
  userInfo: null, // 个人信息
};

const baseReducer = (state = initial, action) => {
  state = cloneDeep(state);
  if (action.type === TYPES.SET_USER_INFO) {
    state.userInfo = action.info;
  }
  return state;
};

export default baseReducer;
